package org.eiahe.hr.salary.domain;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.ehe.common.mybatis.core.domain.BaseEntity;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 薪资纠错记录对象 hr_salary_correction_record
 *
 * @author zhangnn
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("hr_salary_correction_record")
public class SalaryCorrectionRecord extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 纠错记录ID
     */
    @TableId(type = IdType.AUTO)
    private Long correctionId;

    /**
     * 租户ID
     */
    private String tenantId;

    /**
     * 工号
     */
    private String employeeNo;

    /**
     * 员工姓名
     */
    private String employeeName;

    /**
     * 年月(yyyyMM格式)
     */
    @TableField("year_month1")
    private String yearMonth;

    /**
     * 纠错类型(1冲减 2状态回退 3数据修正)
     */
    private String correctionType;

    /**
     * 原薪资构成ID
     */
    private Long originalStructureId;

    /**
     * 冲减金额(负值表示冲减)
     */
    private BigDecimal correctionAmount;

    /**
     * 原状态
     */
    private String originalStatus;

    /**
     * 新状态
     */
    private String newStatus;

    /**
     * 纠错原因
     */
    private String correctionReason;

    /**
     * 审批状态(0待审批 1审批通过 2审批拒绝)
     */
    private String approvalStatus;

    /**
     * 审批人
     */
    private String approver;

    private Date approvalTime;

    /**
     * 审批意见
     */
    private String approvalOpinion;

    /**
     * 删除标志(0存在 1删除)
     */
    @TableLogic
    private String delFlag;

    private String remark;
}
